<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>3D图片轮播带倒影</title>
    <style>
        body {
            margin: 0;
            padding: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            background: #efb3d5;
        }

        .stage {
            position: relative;
            width: 600px;
            height: 600px;
            perspective: 1500px;
        }

        .carousel {
            position: absolute;
            width: 100%;
            height: 100%;
            transform-style: preserve-3d;
            animation: rotate 20s linear infinite;
        }

        .carousel img {
            position: absolute;
            width: 150px;
            height: 100px;
            object-fit: cover;
            border-radius: 10px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
            -webkit-box-reflect: below 5px linear-gradient(transparent, rgba(0, 0, 0, 0.2));
        }

        .carousel img:nth-child(1) {
            transform: rotateY(0deg) translateZ(300px);
        }

        .carousel img:nth-child(2) {
            transform: rotateY(45deg) translateZ(300px);
        }

        .carousel img:nth-child(3) {
            transform: rotateY(90deg) translateZ(300px);
        }

        .carousel img:nth-child(4) {
            transform: rotateY(135deg) translateZ(300px);
        }

        .carousel img:nth-child(5) {
            transform: rotateY(180deg) translateZ(300px);
        }

        .carousel img:nth-child(6) {
            transform: rotateY(225deg) translateZ(300px);
        }

        .carousel img:nth-child(7) {
            transform: rotateY(270deg) translateZ(300px);
        }

        .carousel img:nth-child(8) {
            transform: rotateY(315deg) translateZ(300px);
        }

        @keyframes rotate {
            from {
                transform: rotateY(0deg);
            }

            to {
                transform: rotateY(360deg);
            }
        }
    </style>
</head>

<body>
    <div class="stage">
        <div class="carousel">
            <img src="../1.png" alt="Image 1" />
            <img src="../1.png" alt="Image 1" />
            <img src="../1.png" alt="Image 1" />
            <img src="../1.png" alt="Image 1" />
            <img src="../1.png" alt="Image 1" />
            <img src="../1.png" alt="Image 1" />
            <img src="../1.png" alt="Image 1" />
            <img src="../1.png" alt="Image 1" />
        </div>
    </div>
</body>

</html>

<!-- <!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>公众号关注：前端Hardy</title>
</head>
<style>
    body {
        display: flex;
        justify-content: center;
        margin: 0;
        padding: 0;
        background: #efb3d5;
    }

    .container {
        position: relative;
        margin-top: 50px;
    }

    .stage {
        position: relative;
        width: 800px;
        height: 240px;
        margin: 20px auto;
        perspective: 2000px;
        transform-style: preserve-3d;
        -webkit-box-reflect: below 10pxlinear-gradient(transparent, rgba(239, 179, 213, 0.8));
    }

    .stage.control {
        position: relative;
        width: 100%;
        height: 100%;
        transform-style: preserve-3d;
        transform: translateZ(-2000px) rotateY(50deg) rotateZ(0deg);
        animation: rotate 30s linear infinite;
    }

    .stage.control.imgWrap {
        position: absolute;
        width: 400px;
        height: 400px;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        transform-style: preserve-3d;
    }

    .stage.control.imgWrap.img {
        position: absolute;
        width: 500px;
        height: 400px;
        line-height: 400px;
        text-align: center;
        font-size: 120px;
        top: 0;
        left: 0;
        object-fit: cover;
        transform-style: preserve-3d;
        transform-origin: 50%50%0px;
    }

    .stage.control.imgWrapimg {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 20px;
    }

    .stage.control.imgWrap.img1 {
        transform: rotateY(80deg) translateZ(650px);
    }

    .stage.control.imgWrap.img2 {
        transform: rotateY(125deg) translateZ(650px);
    }

    .stage.control.imgWrap.img3 {
        transform: rotateY(170deg) translateZ(650px);
    }

    .stage.control.imgWrap.img4 {
        transform: rotateY(215deg) translateZ(650px);
    }

    .stage.control.imgWrap.img5 {
        transform: rotateY(260deg) translateZ(650px);
    }

    .stage.control.imgWrap.img6 {
        transform: rotateY(305deg) translateZ(650px);
    }

    .stage.control.imgWrap.img7 {
        transform: rotateY(350deg) translateZ(650px);
    }

    .stage.control.imgWrap.img8 {
        transform: rotateY(395deg) translateZ(650px);
    }

    @keyframes rotate {
        0% {
            transform: translateZ(-2000px) rotateY(0deg);
        }

        35% {
            transform: translateZ(-2000px) rotateY(-250deg);
        }

        70% {
            transform: translateZ(-2000px) rotateY(-500deg);
        }

        100% {
            transform: translateZ(-2000px) rotateY(-720deg);
        }
    }
</style>

<body>
    <div class="container">
        <div class="stage">
            <div class="control">
                <div class="imgWrap">
                    <div class="img img1">
                        <img src="../1.png" />
                    </div>
                    <div class="img img2">
                        <img src="../1.png" />
                    </div>
                    <div class="img img3">
                        <img src="../1.png" />
                    </div>
                    <div class="img img4">
                        <img src="../1.png" />
                    </div>
                    <div class="img img5">
                        <img src="../1.png" />
                    </div>
                    <div class="img img6">
                        <img src="../1.png" />
                    </div>
                    <div class="img img7">
                        <img src="../1.png" />
                    </div>
                    <div class="img img8">
                        <img src="../1.png" />
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>

</html> -->